﻿<Window x:Class="WpfApplication31.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Window.TaskbarItemInfo>
        <TaskbarItemInfo />
    </Window.TaskbarItemInfo>
    <Window.Resources>      
        <DataTemplate x:Key="OverlayIcon">
            <Grid Width="20" Height="20">
                <Ellipse Fill="Red"
                            Stroke="White"
                            StrokeThickness="2"/>

                <TextBlock Text="{Binding CountText}"
                            TextAlignment="Center"
                            Foreground="White"
                            FontWeight="Bold"
                            Height="16"
                            VerticalAlignment="Center"
                            FontSize="12">
                    <TextBlock.Effect>
                        <DropShadowEffect ShadowDepth="0" />
                    </TextBlock.Effect>
                </TextBlock>
            </Grid>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <Button Content="Get Tweets"
                Height="23"
                HorizontalAlignment="Left"
                Margin="12,12,0,0"
                x:Name="GetTweets"
                VerticalAlignment="Top"
                Width="75"
                Click="GetTweets_Click" />
        <ListBox x:Name="TweetList"
                 HorizontalContentAlignment="Stretch"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                 Margin="12,41,12,12">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="10">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <Image Source="{Binding Image}"
                               Grid.Column="0"
                               Margin="3"
                               Width="50"
                               Height="50"
                               Stretch="UniformToFill" />

                        <TextBlock Text="{Binding Title}"
                                   FontSize="14"
                                   Margin="3"
                                   Grid.Column="1"
                                   TextWrapping="Wrap" />
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</Window>
